package com.asset.salesforce.service;

import java.util.List;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

import com.asset.salesforce.dao.PostDaoImpl;
import com.asset.salesforce.domain.Employee;
import com.asset.salesforce.domain.Post;
import com.sun.org.apache.regexp.internal.recompile;



@Service
@Transactional(readOnly=true)
public class PostService {
	
	@Autowired
	private PostDaoImpl postDaoImpl;
	
	
	@Transactional(readOnly=false)
	public void addPost(Post post) {
		postDaoImpl.addPost(post);
		
	}
	public List<Post> getAllPostsByEmpId(Employee emp) {
		return  postDaoImpl.getAllPostsByEmpId(emp);
	}
	public Post getPostById(Integer id) {
		return postDaoImpl.getPostById(id);
	}
	public List<Post> getPostsByMe(Employee employee) {
		return postDaoImpl.getPostsByMe(employee);
	}
	public List<Post> getPostsByCompany(Employee employee) {
		return postDaoImpl.getPostsByCompany(employee);
	}
	public List<Post> getPostsFromFollow(Employee employee) {
		return null;
		
	}
}
